<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>IupGLExpander</title>

<link rel="stylesheet" type="text/css" href="../../style.css">
<style type="text/css">
.style1 {
	font-size: large;
}
.style3 {
	background-color: #CEE7FF;
}
</style>
</head>
<body>
<div id="navigation">
  <ul>
    <li><a href="#Creation">Creation</a></li>
    <li><a href="#Attributes">Attributes</a></li>
    <li><a href="#Callbacks">Callbacks</a></li>
    <li><a href="#Notes">Notes</a></li>
    <li><a href="#Examples">Examples</a></li>
    <li><a href="#SeeAlso">See Also</a></li>
  </ul>
</div>

<h2>IupGLExpander <span class="style1">(since 3.11)</span></h2>
<p>Creates an embedded OpenGL container that can interactively show or hide its child. 
It inherits from <a href="iupglsubcanvas.html">IupGLSubCanvas</a>. It exists only 
  inside an
<a href="iupglcanvasbox.html">IupGLCanvasBox</a>.</p>

<h3><a name="Creation">Creation</a></h3>

<pre>Ihandle* IupGLExpander(Ihandle*<strong> child</strong>); [in C]
iup.glexpander{<strong>child</strong>: ihandle} -&gt; (<strong>elem</strong>: ihandle) [in Lua]
glexpander(<strong>child</strong>) [in LED]</pre>
  <p><strong>child</strong>: Identifier of an interface element. It can be NULL 
  (nil in Lua), or empty in LED.</p>
  <p>
  <u>Returns:</u> the identifier of the 
  created element, or NULL if an error occurs.</p>

<h3><a name="Attributes">Attributes</a></h3>


<p>The 
  <strong>IupGLExpander</strong> element handle all attributes defined for a
<a href="iupglsubcanvas.html">IupGLSubCanvas</a> control.</p>
<blockquote>
  <hr>
</blockquote>



<p>
<strong>BACKCOLOR</strong> (<font SIZE="3">non inheritable</font>): background 
color of the title area. Default: &quot;50 100 150&quot;.</p>


<p><strong>BARPOSITION</strong>: indicates the bar handler 
position. 
Possible values are &quot;TOP&quot;, 
&quot;BOTTOM&quot;, &quot;LEFT&quot; or &quot;RIGHT&quot;. Default: &quot;TOP&quot;.</p>
<p><strong>BARSIZE</strong> (<font SIZE="3">non inheritable</font>): controls 
the size of the bar handler. Default: the height of a text line plus 5 pixels.</p>


<p><a href="../attrib/iup_expand.html">EXPAND</a> (<font SIZE="3">non inheritable</font>): 
the default value is &quot;YES&quot;.</p>
<p><strong>EXTRABUTTONS</strong> (<font SIZE="3">non inheritable</font>): sets 
the number of extra image buttons at right when BARPOSITION=TOP. The maximum 
number of buttons is 3. See the EXTRABUTTON_CB callback. Default: 0.</p>
<p class="info"><strong>IMAGEEXTRAid</strong>: image name used for the button. 
id can be 1, 2 or 3. 1 is the rightmost button, and count from right to left.<br><strong>IMAGEEXTRAPRESSid</strong>: image name used 
for the button when pressed.<br>
<strong>IMAGEEXTRAHIGHLIGHTid</strong>: image name for the button used when mouse is over the 
button area.</p>
<p class="info">All images must be 16x16, or smaller but the occupied size will 
still be 16x16.</p>


  <p><strong>FORECOLOR</strong> (<font SIZE="3">non inheritable</font>): text 
  and arrow color. Default: &quot;255 255 255&quot;.</p>


  <p><strong>HIGHCOLOR</strong> (<font SIZE="3">non inheritable</font>): text 
  and arrow color when highlight. Default: 
  &quot;200 225 245&quot;.</p>
<p><strong>IMAGE</strong> (<font SIZE="3">non inheritable</font>):
<span style="color: rgb(0, 0, 0); font-family: tahoma, verdana, arial, helvetica, geneva, sans-serif; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20.799999237060547px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;">
image name to </span>replace the arrow by an image STATE=CLOSE. Works only when 
BARPOSITION=TOP. The minimum horizontal space reserved for the handler is 20 
pixels. Use <a href="../func/iupsethandle.html">IupSetHandle</a> or
	<a href="../func/iupsetattributehandle.html">IupSetAttributeHandle</a> to 
	associate an image to a name. See also <a href="../elem/iupimage.html">IupImage</a>.</p>
<p class="info"><strong>IMAGEOPEN</strong>: image name used when STATE=OPEN.<br>
<strong>IMAGEHIGHLIGHT</strong>: image name used when mouse is over the bar 
handler and STATE=CLOSE.<br><strong>IMAGEOPENHIGHLIGHT</strong>: image name used 
when mouse is over the bar handler and STATE=OPEN.</p>
<p><strong>MOVEABLE</strong> (<font SIZE="3">non inheritable</font>): enable the 
frame to be interactively moved when it is a direct child of the <strong>
IupGLCanvasBox</strong>. Default: NO.</p>
<p><strong>MOVETOTOP</strong> (<font SIZE="3">non inheritable</font>): when 
MOVEABLE=Yes and the frame is moved then its ZORDER is also set to TOP. (Since 
3.11.1)</p>

  
  <p><strong>PRESSCOLOR</strong> (<font SIZE="3">non inheritable</font>): text 
  and arrow color when pressed. Default: 
  &quot;150 200 235&quot;.</p>

  
<p><strong>STATE</strong> (<font SIZE="3">non inheritable</font>): Show or hide 
the container elements. Possible values: &quot;OPEN&quot; (expanded) or &quot;CLOSE&quot; (collapsed). Default: 
OPEN. Setting this attribute will automatically change the layout of the entire 
dialog so the child can be recomposed.</p>
<p><strong>TITLE</strong> (<font SIZE="3">non inheritable</font>): title text, 
shown in the title bar near the expand or collapse symbol. Shown only when 
BARPOSITION=TOP.</p>
<p><strong>TITLEBACKIMAGE</strong> (<font SIZE="3">non inheritable</font>): 
image name to be used as a background of the title area. It will be zoomed to 
fill the background (it does not includes the border). Use <a href="../func/iupsethandle.html">IupSetHandle</a> or
	<a href="../func/iupsetattributehandle.html">IupSetAttributeHandle</a> to 
	associate an image to a name. See also <a href="../elem/iupimage.html">IupImage</a>. 
(Since 3.11.1)</p>
  <p><strong>TITLEBACKIMAGEINACTIVE</strong> (<font SIZE="3">non inheritable</font>): 
  background image name of the element when inactive. If it is not defined then the 
  TITLEBACKIMAGE 
  is used and its colors will be replaced by a modified version creating the 
  disabled effect.&nbsp; (Since 3.11.2) </p>

  
  <blockquote>
  <hr>
</blockquote>
<p>
<a href="../attrib/iup_clientsize.html">CLIENTSIZE</a>, 
	<a href="../attrib/iup_clientoffset.html">CLIENTOFFSET</a>: 
also accepted.</p>


<h3><a name="Callbacks">Callbacks</a></h3>


<p>The 
  <strong>IupGLFrame</strong> element handle all callbacks defined for the
<strong>IupGLSubCanvas</strong> control.</p>
<blockquote>
  <hr>
</blockquote>


<p><a href="../call/iup_action.html">ACTION</a>: Action generated after the 
expander state is interactively changed.</p>

  
    
<pre>int function(Ihandle*<strong> ih</strong>); [in C]<br><strong>elem</strong>:action() -&gt; (<strong>ret</strong>: number) [in Lua]</pre>

    
<p class="info"><strong>ih</strong>:
  identifier of the element that activated the 
  event.&nbsp;</p>

  
<p><strong>MOVE_CB</strong>: Called after the frame was moved on the <strong>
IupGLCanvasBox</strong>, when MOVEABLE=Yes. The 
coordinates are the same as the <a href="../attrib/iup_position.html">POSITION</a> 
attribute.</p>
<pre>int function(Ihandle *<strong>ih</strong>, int <strong>x</strong>, int <strong>y</strong>); <em>[in C]</em><br><b>elem</b>:trayclick_cb(<strong>x</strong>, <strong>y</strong>: number) -&gt; (<strong>ret</strong>: number) <em>[in Lua]</em></pre>
<p class="info"><strong>ih</strong>: identifier of the element that activated 
the event.<br>
<strong>x</strong>, <strong>y</strong>: coordinates of the new position. </p>


<p><strong>OPENCLOSE_CB</strong>: Action generated before the expander state is 
interactively changed.</p>

  
    
<pre>int function(Ihandle*<strong> ih</strong>, int <strong>state</strong>); [in C]<br><strong>elem</strong>:openclose<span class="style3">_</span>cb(<strong>state</strong>: number) -&gt; (<strong>ret</strong>: number) [in Lua]</pre>

    
<p class="info"><strong>ih</strong>:
  identifier of the element that activated the 
  event.&nbsp;<br><strong>state</strong>: new state to be applied. </p>
<p class="info"><strong>Returns</strong>: if return IUP_IGNORE the new state is 
ignored.</p>

  
<p><strong>EXTRABUTTON_CB</strong>: Action generated when any mouse button is 
pressed and released.</p>
<pre>int function(Ihandle* <strong>ih</strong>, int <strong>button</strong>, int <strong>pressed</strong>); [in C]
<strong>elem</strong>:extrabutton_cb(<strong>button</strong>, <strong>pressed</strong>: number) -&gt; (<strong>ret</strong>: number) [in Lua]</pre>
<blockquote>
<p><strong>ih</strong>:
  identifies the element that activated the 
  event.<br>
<strong>button</strong>: identifies the extra button. can be 1, 2 or 3. (this is 
not the same as BUTTON_CB)<br><strong>pressed</strong>:
  indicates the state of the button:</p>
	<p class="info">0 - mouse button was released;<br>
    1 - mouse button was pressed.</p>
</blockquote>
    
<h3><a name="Notes">Notes</a></h3>
<p>The container can be created with no elements and be dynamic filled using
  <a href="../func/iupappend.html">IupAppend</a> or
<a href="../func/iupinsert.html">IupInsert</a>.</p>
<p>When the TITLE is defined and BARPOSITION=TOP then the expand/collapse symbol 
is left aligned. In all other situations the expand/collapse symbol is centered.</p>

</body>

</html>
